/**
 * Created by Tang on 2017/7/14.
 */
function User(name,pwd){
    this.username = name;
    this.password = pwd;
}

function UserManager() {

}
UserManager.prototype = {
    //用户登录方法;
    login:function (name,pwd,fn) {
        var user = new User(name,pwd);
        $.ajax({
            type:'post',
            url:'http://localhost:2403/users/login',
            data:obj,
            success:fn,
            error:function (err) {
                if (err.status == 401){
                    alert('账号密码错误');
                }
            }
        })
    },
    logOut:function () {

    }
};